<link href="<?php echo base_url(); ?>assets/css/jquery-ui-1.8.16.custom.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo base_url(); ?>assets/jscripts/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/jscripts/jquery.ui.datepicker-nl.js"></script>
<script type="text/javascript">
$(function() {
	$( "#datepicker" ).datepicker({
        		changeMonth: true,
        		changeYear: true,
                yearRange: '1930:2011',
                defaultDate: '01-01-1970'
        	});
			$( "#datepicker" ).datepicker("option", "dateFormat", "dd-mm-yy");
			<?php
            if ($userDetail->birthday != '00-00-0000') {
            ?>
            $( "#datepicker" ).datepicker("setDate" , '<?php echo $userDetail->birthday; ?>');
            <?php
            }
            ?>
			<?php
			if($this->session->userdata('lang') == 'nl'){
					echo '$( "#datepicker" ).datepicker( "option",$.datepicker.regional["nl"] );';
					
			}
			else
			{
				echo '$.datepicker.setDefaults( $.datepicker.regional[ "" ] );';
			}
			?>
});	
</script>
<style>
#content .info-contact span.error {
    color: #FF0000;
	clear:none;
    margin-left: 5px;
	float:left;
	font-weight:500;
	padding-top: 4px;
}
.required {
    color: #FF0000;
	font-weight:500;
}

</style>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/jscripts/jquery.validate.js"></script>
<script type="text/javascript">
$().ready(function() {
	$("#frm_register").validate({
		rules: {
			password: {
				minlength: 5
			},
			password_confirm: {
				minlength: 5,
				equalTo: "#password"
			},
			id_cname: {
				required: true,
				min: 1,
			},			
			firstname: "required",
			lastname: "required"
		},
		messages: {
			password: {
				rangelength: "<?php echo lang('MIN PASSWORD LENGTH'); ?>"
			},
			password_confirm: {
				minlength: "<?php echo lang('MIN PASSWORD LENGTH'); ?>",
				equalTo: "<?php echo lang('SAME PASSWORD'); ?>"
			},
			id_cname: "<?php echo lang('PLEASE CHOOSE COMPANY'); ?>",
			firstname: "<?php echo lang('PLEASE INPUT FIRSTNAME'); ?>",
			lastname: "<?php echo lang('PLEASE INPUT LASTNAME'); ?>"
		}
	});	
});
</script>
<div class="main-banner">
            	
                <div class="right" id="container">
                	<div id="example">
                        <div id="slides">
                            <div class="slides_container"> 
                             <?php
							if(count($slideshows))
							{
								foreach($slideshows as $item)
								{
							?>
                                <a href="#"><img src="<?php echo $this->config->item('link-assets').$this->config->item('upload_folder_banner').$item['image']; ?>" width="665" height="166" alt="" /></a>
							<?php
                                }
                            }
                            ?>     
                            </div>
                            <div class="bg-left"></div>
                            <div class="bg-right"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div id="main-container">
        	<div class="main-left">
            	<div class="block">
                    <h3><a href="#">Lorem Ipsum is simply dummy</a></h3>
                    <p>Text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book</p>
                 </div>
                 <div class="block service">
                 	<h3><a href="#">Diensten:</a></h3>
                    <ul class="list">
                    	<a href="jongeren.html">Jongeren</a></li>
                        <a href="opleidingstraject.html">Opleidingstraject</a></li>
                        <a href="reintegratie.html">Reeintegratie</a></li>
                        <a href="bedrijven.html">Bedrijven</a></li>
                    </ul>
                 </div>
            </div>
            <div class="main-right">
            	<h1><?php echo lang('MEMBER CP'); ?></h1>
	             <?php
					if(validation_errors()!='')
					{
						echo "<div class='alert'>".validation_errors('<i>', '<br></i>')."</div>";	
					}
					if($this->session->flashdata('error')!='')
					{
						echo ' <div class="alert" >'.$this->session->flashdata('message')."</div>";
					}
					if($this->session->flashdata('success')!='')
					{
						echo ' <div class="success" >'.$this->session->flashdata('message')."</div>";
					}
					echo form_open('user/update_student','name="frm_register" id="frm_register"');
				?>  
                <div class="block1">
                    <h4 class="title"><?php echo lang('ACCOUNT INFORMATION'); ?></h4>
                    <ul>
                    	
                        	<label><?php echo lang('EMAIL')." (".lang('USERNAME').")"; ?>*:</label>
                            <?php echo $userDetail->username; ?>
                        </li>
                        
                        	<label><?php echo lang('CURRENT PASSWORD'); ?>:</label>
                            <input type="password" style="float:left" name="oldpassword" id="oldpassword"  value="" />
                        </li>
                        
                        	<label><?php echo lang('CHANGE PASSWORD'); ?>:</label>
                            <input type="password" style="float:left" name="password" id="password"  value="" />
                        </li>
                        
                        	<label><?php echo lang('RETYPE PASSWORD'); ?>:</label>
                            <input type="password" style="float:left" name="password_confirm" id="password_confirm" />
                        </li>
                    </ul>
                </div>
                <div class="block1"> 
                    <h4 class="title"><?php echo lang('PROFILE INFO'); ?></h4>
                    <ul>
                        
                        	<label><?php echo lang('COMPANY NAME'); ?>:</label>
                            <select style="float:left" name="id_cname" id="id_cname">
                                <option value="0">--Choose company--</option>
                                <?php
                                foreach ($lstCompany as $company) {
                                    $selected = '';
                                    if ($company->id_company == $userDetail->company_id) {
                                        $selected = 'selected';
                                    }
                                ?>
                                <option <?php echo $selected; ?> value="<?php echo $company->id_company; ?>"><?php echo $company->name; ?></option>
                                <?php
                                }
                                ?>
                            </select>
                        </li>
                    	
                        	<label><?php echo lang('FIRSTNAME'); ?>*:</label>
                            <input name="firstname" id="firstname" style="float:left"  type="text" value="<?php echo $userDetail->firstname; ?>" />
                        </li>
                        
                        	<label><?php echo lang('MIDDLENAME'); ?>:</label>
                            <input name="middlename" id="middlename" style="float:left"  type="text"  value="<?php echo $userDetail->middlename; ?>" />
                        </li>
                        
                        	<label><?php echo lang('LASTNAME'); ?>*:</label>
                            <input name="lastname" id="lastname" style="float:left"  type="text"  value="<?php echo $userDetail->lastname; ?>"/>
                        </li>
                        
                        	<label><?php echo lang('BIRTHDAY'); ?>:</label>
                            <input  type="text" style="float:left" name="birthday" class="icon-calendar" id="datepicker" />
                        </li>
                        
                        	<label><?php echo lang('GENDER'); ?>:</label>
                            <input name="gender" type="radio"  value="1" <?php echo $userDetail->gender==1?'checked':''; ?> style="clear:none" /><span style="width:70px"><?php echo lang('MALE'); ?></span>
                            <input name="gender" type="radio" value="0" <?php echo $userDetail->gender==0?'checked':''; ?> style="clear:none" /><span style="width:70px"><?php echo lang('FEMALE'); ?></span>
                        </li>
                        
                        	<label><?php echo lang('TELEPHONE'); ?>:</label>
                            <input  type="text" style="float:left" name="phone" id="phone"  value="<?php echo $userDetail->phone; ?>" />
                        </li>
                        <li style="display:none">
                        	<label><?php echo lang('POSTAL CODE'); ?>:</label>
                            <input  type="text" style="float:left" name="zipcode" id="zipcode"  value="<?php echo $userDetail->postal_code; ?>" />
                        </li>
                        <li style="display:none">
                        	<label><?php echo lang('ADDRESS'); ?>:</label>
                            <input  type="text" style="float:left" name="address" id="address" value="<?php echo $userDetail->address; ?>" />
                        </li>
                        <li style="display:none">
                        	<label><?php echo lang('CITY'); ?>:</label>
                            <select id="city" name="city" class="order-tt" style="padding:3px 0; height:25px">
                                <option value="0">--<?php echo lang('CHOOSE CITY'); ?>--</option>
    							<?php
                                foreach($lstCity as $city) 
    							{
                                    $selected=($userDetail->id_city==$city['place_id'])?" selected":" ";
    								echo "<option ".$selected." value='".$city['place_id']."'>".$city['city']."</option>";
                                }
                                ?>
                            </select>
                        </li>
                        
                            <input class="button" type="submit" value="<?php echo lang('T_SEND'); ?>" name="" />
                        </li>
                    </ul>
            </div>
            </form>
            </div>
        </div>
        
    <div id="block-social">
    	<p>Rembrandtweg 257, 2981 CZ Ridderkerk</p>
        <ul>
        	<img src="<?php echo base_url(); ?>assets/images/icon-facebook-01.png" width="20" height="20" alt="" />
            <a href="http://www.facebook.com/lerenzonderschool">Facebook</a></li>
            <img src="<?php echo base_url(); ?>assets/images/icon-twitter-01.png" width="20" height="20" alt="" /><a href="http://www.twitter.com/bma_academy">Twitter</a></li>
            <img src="<?php echo base_url(); ?>assets/images/icon-linkedin.png" width="20" height="20" alt="" /><a href="http://www.linkedin.com/company/2536883?trk=tyah">Linkedin</a></li>
            <img src="<?php echo base_url(); ?>assets/images/icon-email.png" width="20" height="20" alt="" /><a href="mailto:info@bma-academy.nl">info@bma-academy.nl</a></li>
            <img src="<?php echo base_url(); ?>assets/images/icon-phone.png" width="20" height="20" alt="" /><a href="#">0180-420199</a></li>
        </ul>
    </div>
    
<script>
jQuery(document).ready(function(){
	jQuery("#home").addClass('selected');
});
</script>